import Component from "./component/index.js";

const components = [
    Component
];

//定义install方法
const install = Vue => {
    if (install.installed) return;
    install.installed = true;
    components.map(component => Vue.component(component.name, component));
};

if (typeof window !== "undefined" && window.Vue) {
    install(window.Vue);
}

export default {
    install,
    ...components
};